package com.ruoyi.web.controller.controllers;


import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.provider.domain.AhctSurveyor;
import com.ruoyi.provider.service.AhctSurveyorService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("/case")
public class AhctSurveyorController {

    @Resource
    private AhctSurveyorService AhctSurveyorService;

    //获取查勘员列表
    @GetMapping("/getSurveyor")
    public AjaxResult getCaseCondition(){

        try {
            List<AhctSurveyor> list = AhctSurveyorService.getCaseCondition();
            return success(list);
        }catch (Exception e) {
            throw new ServiceException("获取异常", HttpStatus.BAD_REQUEST);
        }
    }



}
